
cc.Class({
    extends: cc.Component,

    properties: {
        hasAddSouce:false,
    },

    onLoad () {
    },

    setInfo:function(cFun){
        this.cFun = cFun;
    },

    update: function (dt) {
         if(gGlobal.nodeActor && gGlobal.onGame){
            let boxBird = gGlobal.nodeActor.getBoundingBox();
            let boxStone = this.node.getBoundingBox();
            if(cc.Intersection.rectRect(boxBird,boxStone)){
                if(this.cFun){
                    gGlobal.onGame = false;
                    this.cFun();
                }
            }
         }
        // if(!gGlobal.onGame){
        //     this.node.stopAllActions();
        //     return;
        // } 
    },

});
